home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Unix / maclayersunixend1.30.shar / 1.30 / makefile < prev    next >
Makefile  |  1993-06-17  |  5KB  |  185 lines

  1. #
  2. #    Makefile for layers 1.30
  3. #
  4.  
  5. #    This software is 
  6. #        Copyright (C) 1989-1993 by Eric C. Rosen and David W. Trissel.
  7. #
  8. #    Permission is granted to freely use, copy, modify, and redistribute
  9. #    this software, provided that no attempt is made to gain profit from it,
  10. #    the author is not construed to be liable for any results of using the
  11. #    software, alterations are clearly marked as such, and this notice is
  12. #    not modified.
  13. #
  14. #    The author makes no claims as to the fitness or correctness of this software
  15. #    for any use whatsoever, and it is provided as is. Any use of this software
  16. #    is at the user's own risk.
  17.  
  18. SHELL  = /bin/sh
  19. MAKE   = /bin/make
  20.  
  21. #    If you want to use gcc, uncomment the following line:
  22. # CC       = gcc -pipe -g
  23.  
  24. BIN    = /usr/local
  25. MANDIR = /usr/local/man/manl
  26.  
  27. MS     = l
  28. CFLAGS = -O
  29.  
  30. default:
  31.     @echo "                     MacLayers Unix-Side Installation"
  32.     @echo "                              layers v1.30"
  33.     @echo ""
  34.     @echo "To build the Unix side of MacLayers in the current directory:"
  35.     @echo ""
  36.     @echo 'For SunOS prior to 4.1 and'
  37.     @echo '      other BSD hosts:       % make oldsun'
  38.     @echo 'For SunOS 4.1 and later:     % make sun'
  39.     @echo 'For Sequent hosts:           % make sequent'
  40.     @echo 'For Apple A/UX hosts:        % make aux'
  41.     @echo 'For SGI/IRIX hosts:          % make irix'
  42.     @echo 'For IBM RS/6000/AIX hosts:   % make rs6000'
  43.     @echo 'For SVR4 hosts:              % make svr4'
  44.     @echo 'For DEC/ULTRIX hosts:        % make ultrix'
  45.     @echo 'For NeXT hosts:              % make NeXT'
  46.     @echo ""
  47.     @echo "To install MacLayers: (for system administrators or others who are"
  48.     @echo "   [after building]    making layers available to a group of users)"
  49.     @echo ""
  50.     @echo "For setuid installation:     % make installsetuid"
  51.     @echo "For non-setuid installation: % make installnosetuid"
  52.     @echo "For an explanation of the major caveats of a non-setuid"
  53.     @echo "installation:                % make installhelp"
  54.  
  55. installhelp:
  56.     @echo "Implications of non-setuid installation are:"
  57.     @echo ""
  58.     @echo "1) As with any socket allocating utility your system may be"
  59.     @echo "   *less* secure with this option if your kernel does not protect"
  60.     @echo "   virtual tty's from cross user allocation and access. One"
  61.     @echo "   hole is where the undead program of a disconnected user can be"
  62.     @echo "   left attached to a socket and a later user allocate the same"
  63.     @echo "   socket and receive continued output. Another is that any user"
  64.     @echo "   can read/write to the virtual control terminals of a"
  65.     @echo "   MacLayers user. (The reason for all this is that the layers"
  66.     @echo "   utility cannot set the pseudo tty owner to the user.)"
  67.     @echo ""
  68.     @echo "2) If your utmp file is protected from user writes then"
  69.     @echo "   users will not be able to do login shell windows (write and"
  70.     @echo "   talk-like facilities will be unavailable and who-like commands"
  71.     @echo "   may give inaccurate details.)"
  72.  
  73. all: layers layersize layertitle macbput
  74.  
  75. layers : layers.o protocol.o
  76.     $(CC) $(CFLAGS) -o layers layers.o protocol.o $(LIBS)
  77.  
  78. layersize : layersize.o
  79.     $(CC) $(CFLAGS) -o layersize layersize.o $(LIBS)
  80.  
  81. layertitle : layertitle.o
  82.     $(CC) $(CFLAGS) -o layertitle layertitle.o $(LIBS)
  83.  
  84. macbput : macbput.o
  85.     $(CC) $(CFLAGS) -o macbput macbput.o $(LIBS)
  86.  
  87. layers.o: layers.c layers.h
  88.     $(CC) $(CFLAGS) $(FLAGS) -c layers.c
  89.  
  90. protocol.o: protocol.c layers.h
  91.     $(CC) $(CFLAGS) $(FLAGS) -c protocol.c
  92.  
  93. layersize.o: layersize.c
  94.     $(CC) $(CFLAGS) $(FLAGS) -c layersize.c
  95.  
  96. layertitle.o: layertitle.c
  97.     $(CC) $(CFLAGS) $(FLAGS) -c layertitle.c
  98.  
  99. macbput.o: macbput.c macbput.h
  100.     $(CC) $(CFLAGS) $(FLAGS) -c macbput.c
  101.  
  102. installsetuid: layers layersize layertitle macbput
  103.     rm -f $(BIN)/layers
  104.     rm -f $(BIN)/layersize
  105.     rm -f $(BIN)/layertitle
  106.     rm -f $(BIN)/macbput
  107.     install -c -s -o root -g daemon -m 4711 layers $(BIN)/layers
  108.     install -c -s layersize $(BIN)/layersize
  109.     install -c -s layertitle $(BIN)/layertitle
  110.     install -c -s macbput $(BIN)/macbput
  111.  
  112. installnosetuid: $(PGM) $(PGM2) $(PGM3) $(PGM4)
  113.     rm -f $(BIN)/layers
  114.     rm -f $(BIN)/layersize
  115.     rm -f $(BIN)/layertitle
  116.     rm -f $(BIN)/macbput
  117.     install -c -s layers $(BIN)/layers
  118.     install -c -s layersize $(BIN)/layersize
  119.     install -c -s layertitle $(BIN)/layertitle
  120.     install -c -s macbput $(BIN)/macbput
  121.  
  122. manpage: layers.1
  123.     rm -f $(MANDIR)/layers.$(MS)
  124.     rm -f $(MANDIR)/macbput.$(MS)
  125.     cp layers.1 $(MANDIR)/layers.$(MS)
  126.     cp macbput.1 $(MANDIR)/macbput.$(MS)
  127.     chmod 664 $(MANDIR)/layers.$(MS)
  128.     chmod 664 $(MANDIR)/macbput.$(MS)
  129.  
  130. clean:
  131.     rm -f a.out core layers layersize layertitle macbput *.o
  132.  
  133. shar:
  134.     mkdir 1.30
  135.     cp    layers.c \
  136.         protocol.c \
  137.         layertitle.c \
  138.         layersize.c \
  139.         macbput.c \
  140.         layers.h \
  141.         macbput.h \
  142.         layers.1 \
  143.         layertitle.1 \
  144.         layersize.1 \
  145.         macbput.1 \
  146.         MacLayers.doc \
  147.         layersrc.doc \
  148.         README \
  149.         layersrc \
  150.         macmouse.el \
  151.         makefile    1.30
  152.     shar -o layers130.shar `find 1.30 -print` 
  153.     rm -r 1.30
  154.  
  155. #
  156. # Make compiling easy on following systems:
  157. #
  158.  
  159. oldsun:
  160.     ${MAKE} all
  161.  
  162. sun:
  163.     ${MAKE} FLAGS=-DPOSIXTTY all
  164.  
  165. aux:
  166.     ${MAKE} CC=gcc all
  167.  
  168. irix:
  169.     ${MAKE} FLAGS="-cckr -DSYSV -DIRIX" all
  170.  
  171. rs6000:
  172.     ${MAKE} FLAGS="-cckr -DSYSV -D_BSD -DAIX" all
  173.  
  174. svr4:
  175.     ${MAKE} FLAGS=-DSVR4 LIBS="-lsocket -lnsl" all    
  176.  
  177. ultrix:
  178.     ${MAKE} FLAGS=-DULTRIX all
  179.  
  180. sequent:
  181.     ${MAKE} FLAGS=-DSEQUENT all
  182.  
  183. NeXT:
  184.     ${MAKE} CC=gcc FLAGS=-bsd all
  185.